import service from '@/utils/request'
// @Tags DeviceData
// @Summary 创建设备数据
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.DeviceData true "创建设备数据"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /deviceData/createDeviceData [post]
export const createDeviceData = (data) => {
  return service({
    url: '/deviceData/createDeviceData',
    method: 'post',
    data
  })
}

// @Tags DeviceData
// @Summary 删除设备数据
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.DeviceData true "删除设备数据"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /deviceData/deleteDeviceData [delete]
export const deleteDeviceData = (params) => {
  return service({
    url: '/deviceData/deleteDeviceData',
    method: 'delete',
    params
  })
}

// @Tags DeviceData
// @Summary 批量删除设备数据
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除设备数据"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /deviceData/deleteDeviceData [delete]
export const deleteDeviceDataByIds = (params) => {
  return service({
    url: '/deviceData/deleteDeviceDataByIds',
    method: 'delete',
    params
  })
}

// @Tags DeviceData
// @Summary 更新设备数据
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.DeviceData true "更新设备数据"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /deviceData/updateDeviceData [put]
export const updateDeviceData = (data) => {
  return service({
    url: '/deviceData/updateDeviceData',
    method: 'put',
    data
  })
}

// @Tags DeviceData
// @Summary 用id查询设备数据
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query model.DeviceData true "用id查询设备数据"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /deviceData/findDeviceData [get]
export const findDeviceData = (params) => {
  return service({
    url: '/deviceData/findDeviceData',
    method: 'get',
    params
  })
}

// @Tags DeviceData
// @Summary 分页获取设备数据列表
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取设备数据列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /deviceData/getDeviceDataList [get]
export const getDeviceDataList = (params) => {
  return service({
    url: '/deviceData/getDeviceDataList',
    method: 'get',
    params
  })
}

// @Tags DeviceData
// @Summary 不需要鉴权的设备数据接口
// @Accept application/json
// @Produce application/json
// @Param data query deviceReq.DeviceDataSearch true "分页获取设备数据列表"
// @Success 200 {object} response.Response{data=object,msg=string} "获取成功"
// @Router /deviceData/getDeviceDataPublic [get]
export const getDeviceDataPublic = () => {
  return service({
    url: '/deviceData/getDeviceDataPublic',
    method: 'get',
  })
}


export const getDeviceDataListLatest = (params) => {
  return service({
    url: '/deviceData/getDeviceDataListLatest',
    method: 'get',
    params
  })
}
